package com.ktgj.hotel.service.impl;

import java.util.List;
import com.ktgj.common.core.utils.DateUtils;
import com.ktgj.hotel.domain.HotelOrderException;
import com.ktgj.hotel.mapper.HotelOrderExceptionMapper;
import com.ktgj.hotel.service.IHotelOrderExceptionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 酒店订单异常Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-10-10
 */
@Service
public class HotelOrderExceptionServiceImpl implements IHotelOrderExceptionService
{
    @Autowired
    private HotelOrderExceptionMapper hotelOrderExceptionMapper;

    /**
     * 查询酒店订单异常
     * 
     * @param exceptionId 酒店订单异常ID
     * @return 酒店订单异常
     */
    @Override
    public HotelOrderException selectHotelOrderExceptionById(Long exceptionId)
    {
        return hotelOrderExceptionMapper.selectHotelOrderExceptionById(exceptionId);
    }

    /**
     * 查询酒店订单异常列表
     * 
     * @param hotelOrderException 酒店订单异常
     * @return 酒店订单异常
     */
    @Override
    public List<HotelOrderException> selectHotelOrderExceptionList(HotelOrderException hotelOrderException)
    {
        return hotelOrderExceptionMapper.selectHotelOrderExceptionList(hotelOrderException);
    }

    /**
     * 新增酒店订单异常
     * 
     * @param hotelOrderException 酒店订单异常
     * @return 结果
     */
    @Override
    public int insertHotelOrderException(HotelOrderException hotelOrderException)
    {
        hotelOrderException.setCreateTime(DateUtils.getNowDate());
        return hotelOrderExceptionMapper.insertHotelOrderException(hotelOrderException);
    }

    /**
     * 修改酒店订单异常
     * 
     * @param hotelOrderException 酒店订单异常
     * @return 结果
     */
    @Override
    public int updateHotelOrderException(HotelOrderException hotelOrderException)
    {
        return hotelOrderExceptionMapper.updateHotelOrderException(hotelOrderException);
    }

    /**
     * 批量删除酒店订单异常
     * 
     * @param exceptionIds 需要删除的酒店订单异常ID
     * @return 结果
     */
    @Override
    public int deleteHotelOrderExceptionByIds(Long[] exceptionIds)
    {
        return hotelOrderExceptionMapper.deleteHotelOrderExceptionByIds(exceptionIds);
    }

    /**
     * 删除酒店订单异常信息
     * 
     * @param exceptionId 酒店订单异常ID
     * @return 结果
     */
    @Override
    public int deleteHotelOrderExceptionById(Long exceptionId)
    {
        return hotelOrderExceptionMapper.deleteHotelOrderExceptionById(exceptionId);
    }
}
